﻿@model IQueryable<YTCMS.Domain.Entities.orders>
@using YTCMS.Core;
<table id="sample-table-1" class="table table-striped table-bordered table-hover">
    <thead>
        <tr>
            <th class="center">
                <label>
                    <input type="checkbox" class="ace" />
                    <span class="lbl"></span>
                </label>
            </th>
            <th>订单号</th>
            <th>下单时间</th>
            <th>状态</th>
            <th>订单类型</th>
            <th>下单用户</th>
            <th>支付金额</th>
            <th>联系人</th>
            <th>联系电话</th>
            <th>收货地址</th>
            <th>备注</th>
            <th>操作</th>
        </tr>
    </thead>
    <tbody>
        @{
            if (Model.Any())
            {
                foreach (var item in Model)
                {
                    <tr>
                        <td class="center">
                            <label>
                                <input type="checkbox" class="ace" />
                                <span class="lbl"></span>
                            </label>
                        </td>

                        <td>@item.Code</td>
                        <td>@item.OrderTime</td>
                        <td>@Enum.GetName(typeof(OrderState), item.State) </td>
                        <td>@Enum.GetName(typeof(OrderType), item.OrderType)</td>
                        <td>@item.users.UserName</td>
                        <td>@item.Money</td>
                        <td>@item.ShopPerson</td>
                        <td>@item.ShopMobile</td>
                        <td>@item.ShopAddress</td>
                        <td>@item.Remark</td>
                        <td>
                            <div class="visible-md visible-lg hidden-sm hidden-xs action-buttons">

                                <a class="green" href="/Order/edit?id=@item.Id" title="修改基本信息">
                                    修改
                                </a>
                             
                                <a class="btn btn-xs btn-danger" href="javascript:void(0)" onclick="WZTDelete('/Order/Delete', {id:@item.Id})">
                                    <i class="icon-trash bigger-120"></i>删除
                                </a>
                                <a class="green" href="/Order/Details?code=@item.Code" title="查看订单详情">
                                    查看订单详情
                                </a>
                            </div>
                        </td>
                    </tr>
                }
            }

        }
    </tbody>
</table>
@Html.AjaxPager((int)ViewBag.PageSize, (int)ViewBag.TotalCount)
